home *** CD-ROM | disk | FTP | other *** search
- Path: badger.wmin.ac.uk!darec
- From: darec@westminster.ac.uk (Nadarajah Thavaneethan)
- Newsgroups: comp.lang.c
- Subject: Please help me
- Date: 25 Mar 1996 18:28:30 GMT
- Organization: University of Westminster
- Message-ID: <4j6oke$lfk@badger.wmin.ac.uk>
- NNTP-Posting-Host: badger.wmin.ac.uk
- X-Newsreader: TIN [version 1.2 PL2]
-
- #include <std.h>
-
- void writelines( char[], int );
- int index;
-
-
- void main(void)
- {
-
- int i;
- char rest[80];
-
-
- printf("Enter line ");
- scanf("%s", rest);
- printf("Enter size of new lines");
- scanf("%d", i);
- index =0;
- writelines(rest, i);
- }
-
- void writelines( char r[], int len)
- {
- int i;
-
- while (index < 80) {
- for (i=0; i<len; i++)
- {
-
- putchar(r[index]);
- putchar('\n');
- }
- index++;
- }
- }
-
- This program reads a line of data and writes it out as smaller lines
- it doesn't but it should!
-
- please mail me
-
- darec@westminster.ac.uk
-
-
- Thanks in Advance..
-
-
-